﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace LinearAlgebra
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            InitSaveFileDialog();
        }

        void InitSaveFileDialog()
        {
            libDialog = new SaveFileDialog();
            libDialog.Filter = "Binaries Files (.dll) | *.dll";
            libDialog.DefaultExt = "dll";
        }

        SaveFileDialog libDialog;

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            bool? result = libDialog.ShowDialog();
            if (result == true)
            {
                System.IO.Stream fileStream = libDialog.OpenFile();
                var lib = Properties.Resources.MatrixLibrary;
                lib.CopyTo(fileStream);
                fileStream.Flush();
                fileStream.Close();
            }
        }
    }
}
